import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store/'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import axios from 'axios'
import VueAxios from 'vue-axios'
import moment from 'moment'
import VDistpicker from 'v-distpicker'

//全局过滤器
Vue.filter("dateFmt", (input, formatString = "YYYY-MM-DD hh:mm:ss") => {
    //es5函数参数设置默认值
    //const lastFormatString = formatString ||


     // moment(input) 把时间字符串转成时间对象
     // format(formatString) 把时间对象，按照指定格式，格式化成符合条件的字符串
    return moment(input).format(formatString)
})

Vue.config.productionTip = false;

Vue.component('v-distpicker', VDistpicker)

Vue.use(ElementUI);

Vue.use(VueAxios,axios);
Vue.prototype.$axios = axios;
Vue.prototype.$host = "http://172.17.44.23";
// Vue.prototype.$host2 = "http://localhost:8080";
Vue.prototype.$host2 = "http://172.17.44.23:8080";
new Vue({
	el: '#app',
	router,
	store,
	template: '<App/>',
	components: { App }
})
